import Vue from 'vue'
import Router from 'vue-router'
import Resource from 'vue-resource' /* 引入vue-resource，用来执行Ajax请求 */
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)
Vue.use(Resource)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
      // children: [{
      //   path: '/bar',
      //   name: 'bar',
      //   component: {template: '<li>bar链接跳转</li>'},
      //   meta: {}
      // }]
    }, {
      path: '/foo',
      name: 'foo',
      component: {template: '<h1>foo</h1>'}
    }
  ]
})
